﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace UtilWpf
{
    /// <summary>
    /// UserControlDataGridPropertiesNode.xaml 的交互逻辑
    /// </summary>
    public partial class AucDataGridPropertiesNode : UserControl
    {
        /// <summary>
        /// 
        /// </summary>
        public AucDataGridPropertiesNode()
        {
            InitializeComponent();
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="listObj"></param>
        public void BindingObj<T>(List<T> listObj)
        {
            var ListDatas = listObj.ConvertAll(it => { return (object)it; }).ToList();
            var dg = DataGridPropertiesNode;
            dg.ItemsSource = ListDatas;
            dg.AutoGenerateColumns = false;
            dg.CanUserAddRows = false;
        }
    }
}
